using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class vt_GLIntegrity3Map : EntityTypeConfiguration<vt_GLIntegrity3>
    {
        public vt_GLIntegrity3Map()
        {
            // Primary Key
            this.HasKey(t => t.origin);

            // Properties
            this.Property(t => t.batch)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.origin)
                .IsRequired()
                .HasMaxLength(2);

            // Table & Column Mappings
            this.ToTable("vt_GLIntegrity3");
            this.Property(t => t.batch).HasColumnName("batch");
            this.Property(t => t.origin).HasColumnName("origin");
        }
    }
}
